<?php
/**
 *
 *array :
 *['type']['config'] =>
 *  'title' => t('title for type'),
 *  'description' => 'description for type',
 *['type']['form'] =>
 *  write form default
 *['type']['js'] =>
 *  'file1.js',
 *  'file2.js'
 *['type']['css'] =>
 *  'file1.css',
 *  'file2.css'
 *
 **/
function brt_block_data($default_value = '') {
    icon_default_dialog();
    $brt_data = array();
    /////////////////////////////// Twitter ///////////////////////////////
    $solveto_twitter_form = array(
        'description' => array(
            '#type' => 'textfield',
            '#title' => 'Block description',
            '#description' =>'A brief description of your block. Used on the Blocks administration page.',
            '#required' => true,
            '#default_value' => isset($default_value['description']) ? $default_value['description'] : ''
        ),
    );

    $solveto_twitter_form['twitter_username'] = array(
        '#type' => 'textfield',
        '#title'    =>  t('Twitter username'),
        '#size'         => '15',
        '#required'      => true,
        '#default_value'    => isset($default_value['twitter_username']) ? $default_value['twitter_username'] : ''
    );
    $solveto_twitter_form['twitter_num'] = array(
        '#type'     => 'textfield',
        '#title'    => t('Tweets Posts'),
        '#size'     => '5',
        '#default_value'    => isset($default_value['twitter_num']) ? $default_value['twitter_num'] : ''
    );
    $solveto_twitter_form['twitter_consumer_key'] = array(
        '#type' => 'textfield',
        '#title' => t('Consumer key'),
        '#description' => t('Enter your consumer key from your twitter app'),
        '#maxlength' => '50',
        '#default_value' => isset($default_value['twitter_consumer_key']) ? $default_value['twitter_consumer_key'] : ''
    );
    $solveto_twitter_form['twitter_consumer_secret'] = array(
        '#type' => 'textfield',
        '#title' => t('Consumer secret'),
        '#description' => t('Enter your consumer secret string from your twitter app'),
        '#maxlength' => '50',
        '#default_value' => isset($default_value['twitter_consumer_secret']) ? $default_value['twitter_consumer_secret'] : ''
    );
    $solveto_twitter_form['twitter_access_token'] = array(
        '#type' => 'textfield',
        '#title' => t('Access Token'),
        '#description' => t('Enter your access token string from your twitter app'),
        '#maxlength' => '50',
        '#default_value' => isset($default_value['twitter_access_token']) ? $default_value['twitter_access_token'] : ''
    );
    $solveto_twitter_form['twitter_access_token_secret'] = array(
        '#type' => 'textfield',
        '#title' => t('Access Token Secret'),
        '#description' => t('Enter your access token secret string from your twitter app'),
        '#maxlength' => '50',
        '#default_value' => isset($default_value['twitter_access_token_secret']) ? $default_value['twitter_access_token_secret'] : ''
    );
    $brt_data['solveto_twitter'] = array(
        'config'            => array(
            'title' => t('Solveto Twitter'),
            'description' => 'Create a simple blocks that display your Twitter feed',
            'url' => 'solveto-twitter'
        ),
        'form'              => $solveto_twitter_form,
    );
    /////////////////////////////// Flickr ///////////////////////////////
    $solveto_flickr_form = array(
        'description' => array(
            '#type' => 'textfield',
            '#title' => 'Block description',
            '#description' =>'A brief description of your block. Used on the Blocks administration page.',
            '#required' => true,
            '#default_value' => isset($default_value['description']) ? $default_value['description'] : ''
        ),
    );
    $solveto_flickr_form['flickr_id'] = array(
        '#type'             => 'textfield',
        '#title'            =>  t('Flickr Id'),
        '#size'             => '15',
        '#required'         => true,
        '#default_value' => isset($default_value['flickr_id']) ? $default_value['flickr_id'] : ''
    );
    $solveto_flickr_form['flickr_num'] = array(
        '#type'             => 'textfield',
        '#title'            => t('Flickr Images Number'),
        '#size'             => '5',
        '#default_value' => isset($default_value['flickr_num']) ? $default_value['flickr_num'] : ''
    );
    $brt_data['solveto_flickr'] = array(
        'config'            => array(
            'title' => t('solveto Flickr'),
            'description' => 'Create a simple blocks that display your Flickr images',
            'url' => 'solveto-flickr'
        ),
        'form'              => $solveto_flickr_form,

    );

    /////////////////////////////// Instagram /////////////////////////////

    $solveto_instagram_form = array(
        'description' => array(
            '#type' => 'textfield',
            '#title' => 'Block description',
            '#description' =>'A brief description of your block. Used on the Blocks administration page.',
            '#required' => true,
            '#default_value' => isset($default_value['description']) ? $default_value['description'] : ''
        ),
    );
    $solveto_instagram_form['user_id'] = array(
        '#type' => 'textfield',
        '#title' => t('User Id'),
        '#description' => t('Your unique Instagram user id. Eg. 460786510'),
        '#default_value' => isset($default_value['user_id']) ? $default_value['user_id'] : ''
    );

    $solveto_instagram_form['access_token'] = array(
        '#type' => 'textfield',
        '#title' => t('Access Token'),
        '#description' => t('Your Instagram access token. Eg. 460786509.ab103e5.a54b6834494643588d4217ee986384a8'),
        '#default_value' => isset($default_value['access_token']) ? $default_value['access_token'] : ''
    );

    $solveto_instagram_form['count'] = array(
        '#type' => 'textfield',
        '#title' => t('Number of images to display.'),
        '#default_value' => isset($default_value['count']) ? $default_value['count'] : ''
    );

    $solveto_instagram_form['width'] = array(
        '#type' => 'textfield',
        '#title' => t('Image width in pixels.'),
        '#default_value' => isset($default_value['width']) ? $default_value['width'] : ''
    );

    $solveto_instagram_form['height'] = array(
        '#type' => 'textfield',
        '#title' => t('Image height in pixels.'),
        '#default_value' => isset($default_value['height']) ? $default_value['height'] : ''
    );

    $image_options = array(
        'thumbnail' => t('Thumbnail Preview'),
        'low_resolution' => t('Low Resolution'),
        'standard_resolution' => t('Standard Resolution'),
    );

    $solveto_instagram_form['img_resolution'] = array(
        '#type' => 'select',
        '#title' => t('Image resolution'),
        '#description' => t('Choose the quality of the images you would like to display.'),
        '#options' => $image_options,
        '#default_value' => isset($default_value['img_resolution']) ? $default_value['img_resolution'] : ''
    );
    $brt_data['solveto_instagram'] = array(
        'config'            => array(
            'title'         => t('Solveto Instagram'),
            'description'   => t('Create a simple blocks that display your Instagram images'),
            'url'           => 'solveto-instagram'
        ),
        'form'              => $solveto_instagram_form,
        'css'               => array(
            BRT_BLOCK_PATH . '/css/solveto_instagram/instagram-block.css',
        )
    );

    ///////////////////////////////  Pintereset /////////////////////////////
    $pinterest_form = array(
        'description' => array(
            '#type' => 'textfield',
            '#title' => 'Block description',
            '#description' =>'A brief description of your block. Used on the Blocks administration page.',
            '#required' => true,
        ),
        '#default_value' => isset($default_value['description']) ? $default_value['description'] : ''
    );
    $pinterest_form['pinterest_profile_link'] = array(
        '#type'             => 'textfield',
        '#title'            => t('Pinterest Profile Link'),
        '#description'      => t('e/g: http://www.pinterest.com/pin/99360735500167749/'),
        '#default_value' => isset($default_value['pinterest_profile_link']) ? $default_value['pinterest_profile_link'] : ''
    );
    $brt_data['solveto_pinterest'] = array(
        'config'            => array(
            'title'         => t('Solveto Pinterest'),
            'description'   => t('Create a simple blocks that display your Pinterest images'),
            'url'           => 'solveto-pinterest'
        ),
        'form'              => $pinterest_form
    );

    ///////////////////////////////  Video Widget /////////////////////////////
    $video_form = array(
        'description' => array(
            '#type' => 'textfield',
            '#title' => 'Block description',
            '#description' =>'A brief description of your block. Used on the Blocks administration page.',
            '#required' => true,
            '#default_value' => isset($default_value['description']) ? $default_value['description'] : ''
        ),
    );
    if(module_exists('media')) {
        $video_form['video_media'] = array(
            '#type' => 'media',
            '#tree' => TRUE,
            '#title' => t('Select your video through media'),
            '#description'  => '',
            '#media_options' => array(
                'global' => array(
                    'types' => array(
                        'video' => 'video'
                    ),
                    'schemes' => array(
                        'public' => 'public',
                    ),
                    'file_directory' => 'media',
                    'file_extensions' => 'mov mp4 m4a m4v mpeg avi ogg oga ogv weba webp webm',
                    'uri_scheme' => 'public',
                ),
            ),
            '#default_value' => array('fid' => (isset($default_value['video_media']['fid']) ? $default_value['video_media']['fid'] : ''))
        );
    }
    $brt_data['solveto_video'] = array(
        'config'            => array(
            'title'         => t('Solveto Video Widget'),
            'description'   => t('Solveto Drupal Theme unique block. You can insert youtube,vimeo,... videos from gallery, web to make a simple video widget')
        ),
        'form'              => $video_form,
    );


    $menu_form = array(
            'description' => array(
                '#type' => 'textfield',
                '#title' => 'Block description',
                '#description' => 'A brief description of your block. Used on the Blocks administration page.',
                '#required' => true,
                '#default_value' => isset($default_value['description']) ? $default_value['description'] : ''
            ),
            '#attached' => array(
                'js' => array(
                    BRT_BLOCK_PATH . '/assets/js/header-config.js',

                ),

            ),
    );
    $menu_form['menu_settings'] = array(
        '#type'             => 'fieldset',
        '#title'            => 'Menu Settings',
        '#attributes'       => array(
            'class'         => array('header-options')
        )
    );
    $menus = menu_get_menus();

    $menu_form['menu_settings']['menu_style'] = array(
        '#type'             => 'select',
        '#title'            => t('Choose Menu Style'),
        '#options'          => array(
            'header_1'      => 'Style 1',
            'header_2'      => 'Style 2',
            'header_3'      => 'Style 3',
        ),
        '#default_value'    => isset($default_value['menu_style']) ? $default_value['menu_style'] : ''
    );

    $menu_form['menu_settings']['menu_select'] = array(
        '#type'             => 'select',
        '#title'            => t('Choose Menu'),
        '#options'          => $menus,
        '#default_value'    => isset($default_value['menu_select']) ? $default_value['menu_select'] : 'main-menu'
    );
    
    $display_arr = array(
        'user'          => 'User/Login',
        'address'       => 'Address',
        'social'        => 'Social',
    );
    if(module_exists('commerce') && module_exists('commerce_cart')) {
        $display_arr['cart'] = 'Cart';
    }
    if(module_exists('locale')) {
        $display_arr['language'] = 'Language Switcher';
    }
    $menu_form['menu_settings']['top'] = array(
        '#type'             => 'fieldset',
        '#title'            => 'Top Header',
        '#collapsible'      => TRUE,
        '#collapsed'        => FALSE,
    );
    $menu_form['menu_settings']['top']['top_left_display'] = array(
        '#type'             => 'checkboxes',
        '#title'            => 'Top Left Display',
        '#options'          => $display_arr,
        '#attributes'       => array(
            'class'         => array('hd-options')
        ),
        '#default_value'    => isset($default_value['top_left_display']) ? $default_value['top_left_display'] : array()
    );
    $menu_form['menu_settings']['top']['top_right_display'] = array(
        '#type'             => 'checkboxes',
        '#title'            => 'Top Right Display',
        '#options'          => $display_arr,
        '#attributes'       => array(
            'class'         => array('hd-options')
        ),
        '#default_value'    => isset($default_value['top_right_display']) ? $default_value['top_right_display'] : array()
    );
    $menu_form['menu_settings']['main'] = array(
        '#type'             => 'fieldset',
        '#title'            => 'Main Header',
        '#collapsible'      => TRUE,
        '#collapsed'        => FALSE,
    );
    $menu_form['menu_settings']['main']['menu_enable_sticky'] = array(
        '#type' => 'checkbox',
        '#title' => 'Enable Sticky Menu',
        '#attributes' => array(
            'class' => array('input-checkbox')
        ),
        '#default_value'    => isset($default_value['menu_enable_sticky']) ? $default_value['menu_enable_sticky'] : 1
    );
    $menu_form['menu_settings']['main']['menu_enable_search'] = array(
        '#type' => 'checkbox',
        '#title' => 'Enable Search Form',
        '#attributes' => array(
            'class' => array('input-checkbox')
        ),
        '#default_value'    => isset($default_value['menu_enable_search']) ? $default_value['menu_enable_search'] : 1
    );
    $menu_form['menu_settings']['main']['menu_enable_custom_logo'] = array(
        '#type' => 'checkbox',
        '#title' => 'Use the custom logo',
        '#attributes' => array(
            'class' => array('input-checkbox')
        ),
        '#description' => t('Uncheck here if you want use general settings for display logo.'),
        '#default_value'    => isset($default_value['menu_enable_custom_logo']) ? $default_value['menu_enable_custom_logo'] : ''
    );
    $menu_form['menu_settings']['main']['menu_custom_logo'] = array(
        '#type'         => 'container',
        '#states'       => array(
            'visible'   => array(
                ':input[name="menu_enable_custom_logo"]' => array('checked' => TRUE)
            )
        )
    );

    _build_form_upload_file($menu_form['menu_settings']['main']['menu_custom_logo'],'menu_custom_logo','Menu Logo',$default_value);

    $menu_form['menu_settings']['bottom'] = array(
        '#type'             => 'fieldset',
        '#title'            => 'Bottom Header',
        '#collapsible'      => TRUE,
        '#collapsed'        => FALSE,
    );
    $menu_form['menu_settings']['bottom']['bottom_left_display'] = array(
        '#type'             => 'checkboxes',
        '#title'            => 'Bottom Left Display',
        '#options'          => $display_arr,
        '#attributes'       => array(
            'class'         => array('hd-options')
        ),
        '#default_value'    => isset($default_value['bottom_left_display']) ? $default_value['bottom_left_display'] : array()
    );
    $menu_form['menu_settings']['bottom']['bottom_right_display'] = array(
        '#type'             => 'checkboxes',
        '#title'            => 'Bottom Right Display',
        '#options'          => $display_arr,
        '#attributes'       => array(
            'class'         => array('hd-options')
        ),
        '#default_value'    => isset($default_value['bottom_right_display']) ? $default_value['bottom_right_display'] : array()
    );
    $menu_form['menu_settings']['address_settings'] = array(
        '#type'             => 'fieldset',
        '#title'            => 'Address',
        '#collapsible'      => TRUE,
        '#collapsed'        => FALSE,
    );
    $menu_form['menu_settings']['address_settings']['address_text_1'] = array(
        '#type' => 'textfield',
        '#title'    => t(''),
        '#description'  => '',
        '#default_value'    => isset($default_value['address_text_1']) ? $default_value['address_text_1'] : '102580 Santa Monica BLVD'
    );
    $menu_form['menu_settings']['address_settings']['address_text_2'] = array(
        '#type' => 'textfield',
        '#title'    => t(''),
        '#description'  => '',
        '#default_value'    => isset($default_value['address_text_2']) ? $default_value['address_text_2'] : 'Los Angeles +3 045 224 33 12'
    );

    // Social Settings
    $menu_form['menu_settings']['social_settings'] = array(
        '#type'             => 'fieldset',
        '#title'            => 'Social Settings',
        '#collapsible'      => TRUE,
        '#collapsed'        => FALSE,
    );
    $social_json_default = isset($default_value['hd_social_us_data']) ? $default_value['hd_social_us_data'] : '';
    $menu_form['menu_settings']['social_settings']['hd_social_us_wrapper'] = array(
        '#type'     => 'fieldset',
        '#title'    => 'Content Slide',
        '#prefix'       => '<div id="hd-social" class="us-wrapper unlimited-settings">
                                <div class="us-add-button-wrap">
                                    <a href="#" class="us-add-button button edit">Add More</a>
                                </div>',
        '#suffix'       => '</div>'
    );

    $menu_form['menu_settings']['social_settings']['hd_social_us_wrapper']['hd_social_us_form'] = array(
        '#markup'       => '
        <div class="wrap-sortable">
            <div class="sortable-item small" data-index="">
                <a href="#" class="us-remove-button">X</a>
                <label>Icon</label>
                <div class="form-group icon-picker">
                <fieldset class="select collapsible form-wrapper collapse-processed" id="edit-hd-social-icon">
                    <legend>
                        <span class="fieldset-legend">
                        <a class="fieldset-title" href="#">
                        <span class="fieldset-legend-prefix element-invisible">Hide</span> Icon</a>
                        <span class="summary"></span></span></legend>
                        <div class="fieldset-wrapper">
                            <div class="form-item form-type-select form-item-hd-social-icon-icon">
                            <label for="edit-hd-social-icon-icon">Select Icon </label>
 <select id="edit-hd-social-icon-icon" name="hd_social_icon[icon]" class="form-select"><option value="fa|fa-adjust">adjust</option><option value="fa|fa-adn">adn</option><option value="fa|fa-align-center">align-center</option><option value="fa|fa-align-justify">align-justify</option><option value="fa|fa-align-left">align-left</option><option value="fa|fa-align-right">align-right</option><option value="fa|fa-ambulance">ambulance</option><option value="fa|fa-anchor">anchor</option><option value="fa|fa-android">android</option><option value="fa|fa-angle-double-down">angle-double-down</option><option value="fa|fa-angle-double-left">angle-double-left</option><option value="fa|fa-angle-double-right">angle-double-right</option><option value="fa|fa-angle-double-up">angle-double-up</option><option value="fa|fa-angle-down">angle-down</option><option value="fa|fa-angle-left">angle-left</option><option value="fa|fa-angle-right">angle-right</option><option value="fa|fa-angle-up">angle-up</option><option value="fa|fa-apple">apple</option><option value="fa|fa-archive">archive</option><option value="fa|fa-arrow-circle-down">arrow-circle-down</option><option value="fa|fa-arrow-circle-left">arrow-circle-left</option><option value="fa|fa-arrow-circle-o-down">arrow-circle-o-down</option><option value="fa|fa-arrow-circle-o-left">arrow-circle-o-left</option><option value="fa|fa-arrow-circle-o-right">arrow-circle-o-right</option><option value="fa|fa-arrow-circle-o-up">arrow-circle-o-up</option><option value="fa|fa-arrow-circle-right">arrow-circle-right</option><option value="fa|fa-arrow-circle-up">arrow-circle-up</option><option value="fa|fa-arrow-down">arrow-down</option><option value="fa|fa-arrow-left">arrow-left</option><option value="fa|fa-arrow-right">arrow-right</option><option value="fa|fa-arrow-up">arrow-up</option><option value="fa|fa-arrows">arrows</option><option value="fa|fa-arrows-alt">arrows-alt</option><option value="fa|fa-arrows-h">arrows-h</option><option value="fa|fa-arrows-v">arrows-v</option><option value="fa|fa-asterisk">asterisk</option><option value="fa|fa-backward">backward</option><option value="fa|fa-ban">ban</option><option value="fa|fa-bar-chart-o">bar-chart-o</option><option value="fa|fa-barcode">barcode</option><option value="fa|fa-bars">bars</option><option value="fa|fa-beer">beer</option><option value="fa|fa-bell">bell</option><option value="fa|fa-bell-o">bell-o</option><option value="fa|fa-bitbucket">bitbucket</option><option value="fa|fa-bitbucket-square">bitbucket-square</option><option value="fa|fa-bitcoin">bitcoin</option><option value="fa|fa-bold">bold</option><option value="fa|fa-bolt">bolt</option><option value="fa|fa-book">book</option><option value="fa|fa-bookmark">bookmark</option><option value="fa|fa-bookmark-o">bookmark-o</option><option value="fa|fa-briefcase">briefcase</option><option value="fa|fa-btc">btc</option><option value="fa|fa-bug">bug</option><option value="fa|fa-building-o">building-o</option><option value="fa|fa-bullhorn">bullhorn</option><option value="fa|fa-bullseye">bullseye</option><option value="fa|fa-calendar">calendar</option><option value="fa|fa-calendar-o">calendar-o</option><option value="fa|fa-camera">camera</option><option value="fa|fa-camera-retro">camera-retro</option><option value="fa|fa-caret-down">caret-down</option><option value="fa|fa-caret-left">caret-left</option><option value="fa|fa-caret-right">caret-right</option><option value="fa|fa-caret-square-o-down">caret-square-o-down</option><option value="fa|fa-caret-square-o-left">caret-square-o-left</option><option value="fa|fa-caret-square-o-right">caret-square-o-right</option><option value="fa|fa-caret-square-o-up">caret-square-o-up</option><option value="fa|fa-caret-up">caret-up</option><option value="fa|fa-certificate">certificate</option><option value="fa|fa-chain">chain</option><option value="fa|fa-chain-broken">chain-broken</option><option value="fa|fa-check">check</option><option value="fa|fa-check-circle">check-circle</option><option value="fa|fa-check-circle-o">check-circle-o</option><option value="fa|fa-check-square">check-square</option><option value="fa|fa-check-square-o">check-square-o</option><option value="fa|fa-chevron-circle-down">chevron-circle-down</option><option value="fa|fa-chevron-circle-left">chevron-circle-left</option><option value="fa|fa-chevron-circle-right">chevron-circle-right</option><option value="fa|fa-chevron-circle-up">chevron-circle-up</option><option value="fa|fa-chevron-down">chevron-down</option><option value="fa|fa-chevron-left">chevron-left</option><option value="fa|fa-chevron-right">chevron-right</option><option value="fa|fa-chevron-up">chevron-up</option><option value="fa|fa-circle">circle</option><option value="fa|fa-circle-o">circle-o</option><option value="fa|fa-clipboard">clipboard</option><option value="fa|fa-clock-o">clock-o</option><option value="fa|fa-cloud">cloud</option><option value="fa|fa-cloud-download">cloud-download</option><option value="fa|fa-cloud-upload">cloud-upload</option><option value="fa|fa-cny">cny</option><option value="fa|fa-code">code</option><option value="fa|fa-code-fork">code-fork</option><option value="fa|fa-coffee">coffee</option><option value="fa|fa-cog">cog</option><option value="fa|fa-cogs">cogs</option><option value="fa|fa-columns">columns</option><option value="fa|fa-comment">comment</option><option value="fa|fa-comment-o">comment-o</option><option value="fa|fa-comments">comments</option><option value="fa|fa-comments-o">comments-o</option><option value="fa|fa-compass">compass</option><option value="fa|fa-compress">compress</option><option value="fa|fa-copy">copy</option><option value="fa|fa-credit-card">credit-card</option><option value="fa|fa-crop">crop</option><option value="fa|fa-crosshairs">crosshairs</option><option value="fa|fa-css3">css3</option><option value="fa|fa-cut">cut</option><option value="fa|fa-cutlery">cutlery</option><option value="fa|fa-dashboard">dashboard</option><option value="fa|fa-dedent">dedent</option><option value="fa|fa-desktop">desktop</option><option value="fa|fa-dollar">dollar</option><option value="fa|fa-dot-circle-o">dot-circle-o</option><option value="fa|fa-download">download</option><option value="fa|fa-dribbble">dribbble</option><option value="fa|fa-dropbox">dropbox</option><option value="fa|fa-edit">edit</option><option value="fa|fa-eject">eject</option><option value="fa|fa-ellipsis-h">ellipsis-h</option><option value="fa|fa-ellipsis-v">ellipsis-v</option><option value="fa|fa-envelope">envelope</option><option value="fa|fa-envelope-o">envelope-o</option><option value="fa|fa-eraser">eraser</option><option value="fa|fa-eur">eur</option><option value="fa|fa-euro">euro</option><option value="fa|fa-exchange">exchange</option><option value="fa|fa-exclamation">exclamation</option><option value="fa|fa-exclamation-circle">exclamation-circle</option><option value="fa|fa-exclamation-triangle">exclamation-triangle</option><option value="fa|fa-expand">expand</option><option value="fa|fa-external-link">external-link</option><option value="fa|fa-external-link-square">external-link-square</option><option value="fa|fa-eye">eye</option><option value="fa|fa-eye-slash">eye-slash</option><option value="fa|fa-facebook">facebook</option><option value="fa|fa-facebook-square">facebook-square</option><option value="fa|fa-fast-backward">fast-backward</option><option value="fa|fa-fast-forward">fast-forward</option><option value="fa|fa-female">female</option><option value="fa|fa-fighter-jet">fighter-jet</option><option value="fa|fa-file">file</option><option value="fa|fa-file-o">file-o</option><option value="fa|fa-file-text">file-text</option><option value="fa|fa-file-text-o">file-text-o</option><option value="fa|fa-files-o">files-o</option><option value="fa|fa-film">film</option><option value="fa|fa-filter">filter</option><option value="fa|fa-fire">fire</option><option value="fa|fa-fire-extinguisher">fire-extinguisher</option><option value="fa|fa-flag">flag</option><option value="fa|fa-flag-checkered">flag-checkered</option><option value="fa|fa-flag-o">flag-o</option><option value="fa|fa-flash">flash</option><option value="fa|fa-flask">flask</option><option value="fa|fa-flickr">flickr</option><option value="fa|fa-floppy-o">floppy-o</option><option value="fa|fa-folder">folder</option><option value="fa|fa-folder-o">folder-o</option><option value="fa|fa-folder-open">folder-open</option><option value="fa|fa-folder-open-o">folder-open-o</option><option value="fa|fa-font">font</option><option value="fa|fa-forward">forward</option><option value="fa|fa-foursquare">foursquare</option><option value="fa|fa-frown-o">frown-o</option><option value="fa|fa-gamepad">gamepad</option><option value="fa|fa-gavel">gavel</option><option value="fa|fa-gbp">gbp</option><option value="fa|fa-gear">gear</option><option value="fa|fa-gears">gears</option><option value="fa|fa-gift">gift</option><option value="fa|fa-github">github</option><option value="fa|fa-github-alt">github-alt</option><option value="fa|fa-github-square">github-square</option><option value="fa|fa-gittip">gittip</option><option value="fa|fa-glass">glass</option><option value="fa|fa-globe">globe</option><option value="fa|fa-google-plus">google-plus</option><option value="fa|fa-google-plus-square">google-plus-square</option><option value="fa|fa-group">group</option><option value="fa|fa-h-square">h-square</option><option value="fa|fa-hand-o-down">hand-o-down</option><option value="fa|fa-hand-o-left">hand-o-left</option><option value="fa|fa-hand-o-right">hand-o-right</option><option value="fa|fa-hand-o-up">hand-o-up</option><option value="fa|fa-hdd-o">hdd-o</option><option value="fa|fa-headphones">headphones</option><option value="fa|fa-heart">heart</option><option value="fa|fa-heart-o">heart-o</option><option value="fa|fa-home">home</option><option value="fa|fa-hospital-o">hospital-o</option><option value="fa|fa-html5">html5</option><option value="fa|fa-inbox">inbox</option><option value="fa|fa-indent">indent</option><option value="fa|fa-info">info</option><option value="fa|fa-info-circle">info-circle</option><option value="fa|fa-inr">inr</option><option value="fa|fa-instagram">instagram</option><option value="fa|fa-italic">italic</option><option value="fa|fa-jpy">jpy</option><option value="fa|fa-key">key</option><option value="fa|fa-keyboard-o">keyboard-o</option><option value="fa|fa-krw">krw</option><option value="fa|fa-laptop">laptop</option><option value="fa|fa-leaf">leaf</option><option value="fa|fa-legal">legal</option><option value="fa|fa-lemon-o">lemon-o</option><option value="fa|fa-level-down">level-down</option><option value="fa|fa-level-up">level-up</option><option value="fa|fa-lightbulb-o">lightbulb-o</option><option value="fa|fa-link">link</option><option value="fa|fa-linkedin">linkedin</option><option value="fa|fa-linkedin-square">linkedin-square</option><option value="fa|fa-linux">linux</option><option value="fa|fa-list">list</option><option value="fa|fa-list-alt">list-alt</option><option value="fa|fa-list-ol">list-ol</option><option value="fa|fa-list-ul">list-ul</option><option value="fa|fa-location-arrow">location-arrow</option><option value="fa|fa-lock">lock</option><option value="fa|fa-long-arrow-down">long-arrow-down</option><option value="fa|fa-long-arrow-left">long-arrow-left</option><option value="fa|fa-long-arrow-right">long-arrow-right</option><option value="fa|fa-long-arrow-up">long-arrow-up</option><option value="fa|fa-magic">magic</option><option value="fa|fa-magnet">magnet</option><option value="fa|fa-mail-forward">mail-forward</option><option value="fa|fa-mail-reply">mail-reply</option><option value="fa|fa-mail-reply-all">mail-reply-all</option><option value="fa|fa-male">male</option><option value="fa|fa-map-marker">map-marker</option><option value="fa|fa-maxcdn">maxcdn</option><option value="fa|fa-medkit">medkit</option><option value="fa|fa-meh-o">meh-o</option><option value="fa|fa-microphone">microphone</option><option value="fa|fa-microphone-slash">microphone-slash</option><option value="fa|fa-minus">minus</option><option value="fa|fa-minus-circle">minus-circle</option><option value="fa|fa-minus-square">minus-square</option><option value="fa|fa-minus-square-o">minus-square-o</option><option value="fa|fa-mobile">mobile</option><option value="fa|fa-mobile-phone">mobile-phone</option><option value="fa|fa-money">money</option><option value="fa|fa-moon-o">moon-o</option><option value="fa|fa-music">music</option><option value="fa|fa-outdent">outdent</option><option value="fa|fa-pagelines">pagelines</option><option value="fa|fa-paperclip">paperclip</option><option value="fa|fa-paste">paste</option><option value="fa|fa-pause">pause</option><option value="fa|fa-pencil">pencil</option><option value="fa|fa-pencil-square">pencil-square</option><option value="fa|fa-pencil-square-o">pencil-square-o</option><option value="fa|fa-phone">phone</option><option value="fa|fa-phone-square">phone-square</option><option value="fa|fa-picture-o">picture-o</option><option value="fa|fa-pinterest">pinterest</option><option value="fa|fa-pinterest-square">pinterest-square</option><option value="fa|fa-plane">plane</option><option value="fa|fa-play">play</option><option value="fa|fa-play-circle">play-circle</option><option value="fa|fa-play-circle-o">play-circle-o</option><option value="fa|fa-plus">plus</option><option value="fa|fa-plus-circle">plus-circle</option><option value="fa|fa-plus-square">plus-square</option><option value="fa|fa-plus-square-o">plus-square-o</option><option value="fa|fa-power-off">power-off</option><option value="fa|fa-print">print</option><option value="fa|fa-puzzle-piece">puzzle-piece</option><option value="fa|fa-qrcode">qrcode</option><option value="fa|fa-question">question</option><option value="fa|fa-question-circle">question-circle</option><option value="fa|fa-quote-left">quote-left</option><option value="fa|fa-quote-right">quote-right</option><option value="fa|fa-random">random</option><option value="fa|fa-refresh">refresh</option><option value="fa|fa-renren">renren</option><option value="fa|fa-repeat">repeat</option><option value="fa|fa-reply">reply</option><option value="fa|fa-reply-all">reply-all</option><option value="fa|fa-retweet">retweet</option><option value="fa|fa-rmb">rmb</option><option value="fa|fa-road">road</option><option value="fa|fa-rocket">rocket</option><option value="fa|fa-rotate-left">rotate-left</option><option value="fa|fa-rotate-right">rotate-right</option><option value="fa|fa-rouble">rouble</option><option value="fa|fa-rss">rss</option><option value="fa|fa-rss-square">rss-square</option><option value="fa|fa-rub">rub</option><option value="fa|fa-ruble">ruble</option><option value="fa|fa-rupee">rupee</option><option value="fa|fa-save">save</option><option value="fa|fa-scissors">scissors</option><option value="fa|fa-search">search</option><option value="fa|fa-search-minus">search-minus</option><option value="fa|fa-search-plus">search-plus</option><option value="fa|fa-share">share</option><option value="fa|fa-share-square">share-square</option><option value="fa|fa-share-square-o">share-square-o</option><option value="fa|fa-shield">shield</option><option value="fa|fa-shopping-cart">shopping-cart</option><option value="fa|fa-sign-in">sign-in</option><option value="fa|fa-sign-out">sign-out</option><option value="fa|fa-signal">signal</option><option value="fa|fa-sitemap">sitemap</option><option value="fa|fa-skype">skype</option><option value="fa|fa-smile-o">smile-o</option><option value="fa|fa-sort">sort</option><option value="fa|fa-sort-alpha-asc">sort-alpha-asc</option><option value="fa|fa-sort-alpha-desc">sort-alpha-desc</option><option value="fa|fa-sort-amount-asc">sort-amount-asc</option><option value="fa|fa-sort-amount-desc">sort-amount-desc</option><option value="fa|fa-sort-asc">sort-asc</option><option value="fa|fa-sort-desc">sort-desc</option><option value="fa|fa-sort-down">sort-down</option><option value="fa|fa-sort-numeric-asc">sort-numeric-asc</option><option value="fa|fa-sort-numeric-desc">sort-numeric-desc</option><option value="fa|fa-sort-up">sort-up</option><option value="fa|fa-spinner">spinner</option><option value="fa|fa-square">square</option><option value="fa|fa-square-o">square-o</option><option value="fa|fa-stack-exchange">stack-exchange</option><option value="fa|fa-stack-overflow">stack-overflow</option><option value="fa|fa-star">star</option><option value="fa|fa-star-half">star-half</option><option value="fa|fa-star-half-empty">star-half-empty</option><option value="fa|fa-star-half-full">star-half-full</option><option value="fa|fa-star-half-o">star-half-o</option><option value="fa|fa-star-o">star-o</option><option value="fa|fa-step-backward">step-backward</option><option value="fa|fa-step-forward">step-forward</option><option value="fa|fa-stethoscope">stethoscope</option><option value="fa|fa-stop">stop</option><option value="fa|fa-strikethrough">strikethrough</option><option value="fa|fa-subscript">subscript</option><option value="fa|fa-suitcase">suitcase</option><option value="fa|fa-sun-o">sun-o</option><option value="fa|fa-superscript">superscript</option><option value="fa|fa-table">table</option><option value="fa|fa-tablet">tablet</option><option value="fa|fa-tachometer">tachometer</option><option value="fa|fa-tag">tag</option><option value="fa|fa-tags">tags</option><option value="fa|fa-tasks">tasks</option><option value="fa|fa-terminal">terminal</option><option value="fa|fa-text-height">text-height</option><option value="fa|fa-text-width">text-width</option><option value="fa|fa-th">th</option><option value="fa|fa-th-large">th-large</option><option value="fa|fa-th-list">th-list</option><option value="fa|fa-thumb-tack">thumb-tack</option><option value="fa|fa-thumbs-down">thumbs-down</option><option value="fa|fa-thumbs-o-down">thumbs-o-down</option><option value="fa|fa-thumbs-o-up">thumbs-o-up</option><option value="fa|fa-thumbs-up">thumbs-up</option><option value="fa|fa-ticket">ticket</option><option value="fa|fa-times">times</option><option value="fa|fa-times-circle">times-circle</option><option value="fa|fa-times-circle-o">times-circle-o</option><option value="fa|fa-tint">tint</option><option value="fa|fa-toggle-down">toggle-down</option><option value="fa|fa-toggle-left">toggle-left</option><option value="fa|fa-toggle-right">toggle-right</option><option value="fa|fa-toggle-up">toggle-up</option><option value="fa|fa-trash-o">trash-o</option><option value="fa|fa-trello">trello</option><option value="fa|fa-trophy">trophy</option><option value="fa|fa-truck">truck</option><option value="fa|fa-try">try</option><option value="fa|fa-tumblr">tumblr</option><option value="fa|fa-tumblr-square">tumblr-square</option><option value="fa|fa-turkish-lira">turkish-lira</option><option value="fa|fa-twitter">twitter</option><option value="fa|fa-twitter-square">twitter-square</option><option value="fa|fa-umbrella">umbrella</option><option value="fa|fa-underline">underline</option><option value="fa|fa-undo">undo</option><option value="fa|fa-unlink">unlink</option><option value="fa|fa-unlock">unlock</option><option value="fa|fa-unlock-alt">unlock-alt</option><option value="fa|fa-unsorted">unsorted</option><option value="fa|fa-upload">upload</option><option value="fa|fa-usd">usd</option><option value="fa|fa-user">user</option><option value="fa|fa-user-md">user-md</option><option value="fa|fa-users">users</option><option value="fa|fa-video-camera">video-camera</option><option value="fa|fa-vimeo-square">vimeo-square</option><option value="fa|fa-vk">vk</option><option value="fa|fa-volume-down">volume-down</option><option value="fa|fa-volume-off">volume-off</option><option value="fa|fa-volume-up">volume-up</option><option value="fa|fa-warning">warning</option><option value="fa|fa-weibo">weibo</option><option value="fa|fa-wheelchair">wheelchair</option><option value="fa|fa-windows">windows</option><option value="fa|fa-won">won</option><option value="fa|fa-wrench">wrench</option><option value="fa|fa-xing">xing</option><option value="fa|fa-xing-square">xing-square</option><option value="fa|fa-yen">yen</option><option value="fa|fa-youtube">youtube</option><option value="fa|fa-youtube-play">youtube-play</option><option value="fa|fa-youtube-square">youtube-square</option></select>
                            </div>
                        </div>
                </fieldset>
            </div>
                <label>Link</label>
                <input type="text" name="form_social_link" class="form-text full" value=""/>
            </div>
        </div>',
    );
    $menu_form['menu_settings']['social_settings']['hd_social_us_wrapper']['hd_social_us_data'] = array(
        '#type'         => 'hidden',
        '#attributes'   => array(
            'class'     => array('us-hidden-value')
        ),
        '#default_value'    => $social_json_default
    );

    $brt_data['solveto_header'] = array(
        'config' => array(
            'title' => t('Solveto Header'),
            'description' => t('Solveto Drupal Theme unique block. Creating Custom menu'),
        ),
        'form' => $menu_form,
    );


    /*$sb_nav_form = array(
        'description' => array(
            '#type' => 'textfield',
            '#title' => 'Block description',
            '#description' => 'A brief description of your block. Used on the Blocks administration page.',
            '#required' => true,
            '#default_value' => isset($default_value['description']) ? $default_value['description'] : ''
        ),
    );
    $sb_nav_form['select_menu'] = array(
        '#type'             => 'select',
        '#title'            => t('Choose Menu'),
        '#options'          => $menus,
        '#default_value'    => isset($default_value['menu_select']) ? $default_value['menu_select'] : ''
    );
    $brt_data['solveto_sidebar_navigation'] = array(
        'config' => array(
            'title' => t('Solveto Sidebar Navigation'),
            'description' => t('Solveto Drupal Theme unique block. Creating Custom Navigation in sidebar'),
        ),
        'form' => $sb_nav_form,
    );*/
    return $brt_data;
}
function icon_default_dialog() {

    $options = array();
    $icon_default_value = array();
    if(module_exists('icon')) {
        foreach (icon_bundles() as $bundle_name => $bundle) {
            if (!$bundle['status']) {
                continue;
            }
            foreach ($bundle['icons'] as $icon_key => $icon_value) {
                $icon_name = is_string($icon_key) ? $icon_key : $icon_value;
                if (is_array($icon_value) && isset($icon_value['name'])) {
                    $icon_name = $icon_value['name'];
                }
                $icon_title = is_string($icon_value) ? $icon_value : $icon_name;
                if (is_array($icon_value) && isset($icon_value['title'])) {
                    $icon_title = $icon_value['title'];
                }
                if(isset($bundle['name'])) {
                    $options[$bundle['title']][$bundle['name'] . '|' . $icon_name] = $icon_title;
                }
            }
            $icon_default_value = $options;
        }
        $icon_mark_up = '';
        $icon_fake_markup = '<ul class="list-icon">';
        foreach($icon_default_value as $key => $value) {
            $icon_mark_up .= '<option selected="selected" value="">- No Icon -</option><optgroup label="'.$key.'">';
            foreach ($icon_default_value[$key] as $key2 => $value2) {
                $fake_icon_explode = explode("|",$key2);
                $icon_fake_markup .= '<li><a href="#'.$fake_icon_explode[1].'" class="fake-icon" alt="'.$fake_icon_explode[1].'" icon-name="'.$fake_icon_explode[1].'" data-bundle="'.$fake_icon_explode[0].'" data-icon="'.$key2.'"><i class="'.$fake_icon_explode[0].' '.$fake_icon_explode[1].'"></i></a></li>';
                $icon_mark_up .= '<option value="'.$key2.'">'.$value2.'</option>';
            }
            $icon_mark_up .= '</optgroup>';
        }
        $icon_fake_markup .= '</ul>';
        drupal_add_js(array('icMarkUp' => $icon_mark_up),'setting');
        drupal_add_js(array('icFake' => $icon_fake_markup),'setting');
    }

}